<%@ page language="java" import="java.util.*,com.hs.chd.model.*,com.hs.core.utils.*,com.hs.core.cache.*" pageEncoding="utf-8"%>
<%
	String rightname = (String)request.getAttribute("rightname");
 	
	PageUtil pageUtil = (PageUtil)request.getAttribute("dataList");
    String pageStr = ""; 
    int perpageCount = 1;
    int currentPage = 1;
    List dataList = null;
    if(null != pageUtil){
	   dataList = pageUtil.getPageList();
	   pageStr = pageUtil.getPageStr();
	   perpageCount = pageUtil.getNumberPerPage();
	   currentPage = pageUtil.getCurrentPage();
	}  
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<%@ include file="../../include.jsp"%> 
<script src='<%=basePath%>dwr/interface/dataHelper.js'></script>  

<script language=JavaScript>
  //查询
 function searchData()
{
  	document.searchform.action="<%=basePath%>standard/standardlist.do?1=1";	
	document.searchform.submit();
}
//删除题录信息
 function deleteData(){
    var ids = document.getElementsByName("stdid");    
    var idstr = "";          
    for (var i = 0; i < ids.length; i++)               
    {                     
           if(ids[i].checked){
           	 idstr += ids[i].value+",";
           }            
    }    
    if(idstr == ""){
    	alert("请先选择要删除的标准数据!");
    	return;
    }else{
	 	if(confirm("确定要删除所选择的标准数据吗?")){
	 		dataHelper.deleteSta(idstr,callback4delete); 
	 	}
 	}
 }

 function callback4delete(message){
       alert('共删除'+message+"条数据!");
       document.searchform.action="<%=basePath %>standard/standardlist.do?1=1"
 	   document.searchform.submit();
 	
 }

 function exportData()
{
	document.searchform.action="<%=basePath%>standard/standardexport.do";	
  	document.searchform.submit();
}
//题录信息
 function magaInfo(id)
{
	var pageURL = "<%=basePath %>data/magainfo.do?id=" + id;
	openwindow(pageURL,'800','600','书籍信息'); 
}
</script>
</head>
<body>
 <div class="cont"> 
                <form name="searchform" action="<%=basePath %>standard/standardlist.do?1=1" method="post">
                <table border="0" cellpadding="0" cellspacing="0" style="margin-bottom:0" class="sear">
                  <tr>
                    <td class="tar">
                    <lable>
                                                       病名： 
                    <input type="text" name="rightname" value="<%=rightname==null?"":rightname %>"  style="width:200px" />
                    </lable>
                  
                    <input name="" type="button" class="btn btn-primary" onclick="searchData();"  value=" 查 询 "/>
                    <input name="" type="button" class="btn btn-primary" onclick="exportData();" value=" 导 出 "/>
                    <input name="" type="button" class="btn btn-primary" onclick="deleteData();" value=" 删  除 "/>
                    <input onclick="selectAll(true,'stdid');" type="button" value="全选" class="btn btn-primary"/>
                    <input onclick="selectAll(false,'stdid');" type="button" value="清除" class="btn btn-primary"/> 
                    </td>
                  </tr>
                </table>
                </form>
     <div class="listWrap">
       <table border="0" cellpadding="0" cellspacing="0" class="tableList">
       <tr>
        <th width="5%">
         选择
        </th> 
        <th width="30%">病名</th>
        <th width="30%">异名</th> 
        <th width="15%">导入人员</th> 
        <th width="20%">导入时间</th>
      </tr>
      <%if(null != dataList&&dataList.size()>0){
      		for(int i =0;i<dataList.size();i++){
      			SchdStandword stand = (SchdStandword)dataList.get(i); 
       %>
      <tr>
        <td class="tac"><input type="checkbox" name="stdid"  id="stdid" value="<%=stand.getId() %>" /> 
        </td> 
        <td><%=stand.getRightname()%></td>
        <td><%=StringUtilTool.NULL2Blank(stand.getOthername())%></td>
        <td><%=StringUtilTool.NULL2Blank(stand.getImpuser()) %></td>
        <td class="tac"><%=StringUtilTool.NULL2Blank(stand.getImpdate()) %></td>  
      </tr>
      
      <%}}else{ %>
      <tr>
        <td class="tac" colspan=5><font color=red><strong>没有标准数据！</strong></font></td>
      </tr> 
      <%} %>
    </table>  
     </div>
 <div class="pageWrap">
        <div class="result"></div>
        <div class="page">
              <%=pageStr %>
        </div>
    </div>
</div>
</body>
</html>